﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using dogma.vo.login;

namespace dogma.vo
{
    public partial class LoginView : Form
    {
        public LoginView()
        {
            InitializeComponent();

            usernameTextBox.DataBindings.Add("Text", user, "username");
            passwordTextBox.DataBindings.Add("Text", user, "password");
        }

        private User user = new User();

        private void submitBtn_Click(object sender, EventArgs e)
        {
            Console.WriteLine("Username:" + user.username);
            Console.WriteLine("Password:" + user.password);

            if ("abc".Equals(user.username))
            {
                this.DialogResult = DialogResult.OK;
            }
        }
    }
}
